// Gate convenience unction to extract a string version of what was annotated
public String getAnnotationText( Annotation ann ) {
        DocumentContent content = getContent();
        Node startNode = ann.getStartNode();
        Node endNode = ann.getEndNode();
        long start = startNode.getOffset();
        long end = endNode.getOffset();
        try {
            return content.getContent( start, end ).toString();
        } catch ( Exception e ) {
            e.printStackTrace();
            return null;
        }
    }
//Where this == a document.
